#!/bin/bash 
# extracting command line options and parameters
# 
echo
while [ -n "$1" ]; do
    case $1 in 
        -a)
            echo "Found the -a options"
            ;;
        -b)
            param=$2
            echo "Found the -b options, with parameters value $param"
            shift
            ;;
        -c)
            echo "Found the -c options"
            ;;
        --)
            shift
            break
            ;;
        *)
            echo "$1 is not an options"
            ;;
    esac
    shift
done


#parameters
count=1
for parm in $@; do
    echo "Parameters #$count = $parm"
    count=$[ $parm + 1 ]
done
